package kr.hkit.powerjava.chapter06.work2;

import java.util.Scanner;

public class For_work02 {
	public static void main(String[] args) {
		
		int n ;
		int nmg ;
		
		Scanner input = new Scanner(System.in);
		System.out.print("정수를 입력하시오. ");
		n = input.nextInt();
		
		do {
			if (n >= 0){
				nmg = n % 10;
				System.out.print(nmg + " ");
				n = n / 10;
			}
			else {
				System.out.println("양수를 입력하시오");
				break;
			}
		} while (n!=0);
	}
}
